<template>
  <div class="window">
    <!--header-->
    <div class="windows">
      <img src="../../../assets/common/back.png" alt="" id="imgs" @click="doClick">
      <p>消息中心</p>
      <img src="../../../assets/common/share.png" alt="" id="onimg" @click="isshow = true">
    </div>
    <!--page-->
    <h2>本周新品</h2>
    <p class="w_pin">精选环球好物</p>
    <!--sousuo-->
    <div class="inpt">
      <input type="text" placeholder="🔍请输入商品关键词">
    </div>
    <!--cons-->
    <div class="area">
      <router-link :to="{name: 'home/recommend'}"><img src="../../../assets/Fransnana/mmbb.jpg" alt="" class="noimg"></router-link>
      <p class="posi">奶粉也要有机, 养成健康北鼻</p>
      <div class="xitop">
        <div class="fenlei" v-for="item in ibhun">
          <router-link :to="{name: 'home/recommend'}"><img :src="item.paths" alt=""></router-link>
          <p>{{item.txt}}</p>
          <p>{{item.price}}</p>
        </div>
      </div>
    </div>
    <div class="mask"></div>
    <!--constow-->
    <div class="area">
      <router-link :to="{name: 'home/recommend'}"><img src="../../../assets/Fransnana/mmbb.jpg" alt="" class="noimg"></router-link>
      <p class="posi">奶粉也要有机, 养成健康北鼻</p>
      <div class="xitop">
        <div class="fenlei" v-for="item in ibhun">
          <router-link :to="{name: 'home/recommend'}"><img :src="item.paths" alt=""></router-link>
          <p>{{item.txt}}</p>
          <p>{{item.price}}</p>
        </div>
      </div>
    </div>

    <!--show-->
    <div class="aboutShow" v-show="isshow"></div>
      <transition name="slideDown" >
        <div v-show="isshow" class="v_show">
        <ul class="v_uls">
          <li>
            <div>
              <img src="../../../assets/mustbuy/pengyouquan.png" alt="">
              <p>微信朋友圈</p>
            </div>
            <div>
              <img src="../../../assets/mustbuy/weixin.png" alt="">
              <p>微信好友</p>
            </div>
            <div>
              <img src="../../../assets/mustbuy/QQ.png" alt="">
              <p>QQ好友</p>
            </div>
          </li>
          <li>
            <div>
              <img src="../../../assets/mustbuy/QQkongjian.png" alt="">
              <p>QQ空间</p>
            </div>
            <div>
              <img src="../../../assets/mustbuy/weibo.png" alt="">
              <p>微博</p>
            </div>
            <div>
              <img src="../../../assets/mustbuy/fuzhilianjie.png" alt="">
              <p>复制链接</p>
            </div>
          </li>
        </ul>
          <p @click="isshow = false" class="v_show_p">取消</p>
        </div>
      </transition>

  </div>
</template>
<script>
  export default {
    methods: {
      doClick() {
        this.$router.go(-1);
      },

    },
    data() {
      return {
        isshow: false,
        ibhun: [
          {
            paths: require('../../../assets/Fransnana/naifen.png'),
            txt: '诺优能幼儿配方奶粉',
            price: '¥59'
          },
          {
            paths: require('../../../assets/Fransnana/naifen.png'),
            txt: '诺优能幼儿配方奶粉',
            price: '¥129'
          },
          {
            paths: require('../../../assets/Fransnana/naifen.png'),
            txt: '诺优能幼儿配方奶粉',
            price: '¥88'
          }
        ]
      }
    }
  }
</script>
<style scoped>
  .windows {
    background: #e53e42;
    width: 100%;
    padding-top: 2rem;
    padding-bottom: 1.5rem;
    position: relative;
  }
  #imgs {
    height: 1.8rem;
    position: absolute;
    top: 2.4rem;
    left: 1rem;
  }
  .windows p {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 300;
    color: white;
  }
  #onimg {
    width: 1.9rem;
    position: absolute;
    right: 1.3rem;
    top: 2.2rem;
  }
  h2 {
    font-size: 1.8rem;
    color: #e53e42;
    font-weight: 300;
    margin: 0.5rem;
  }
  .w_pin {
    font-size: 1.5rem;
    margin-left: 0.5rem;
    font-weight: 300;
  }

  meizhu {
    font-size: 1.5rem;
    text-align: center;
    font-weight: 300;
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
  }
  .area {
    position: relative;
  }
  .posi {
    position: absolute;
    top: 11rem;
    font-size: 1.5rem;
    color: white;
    background: #000000;
    opacity: 0.45;
    height: 3rem;
    width: 100%;
    font-weight: 300;
    line-height: 3rem;
    text-align: center;
  }
  .noimg {
    width: 100%;
  }
  .xitop {
    text-align: center;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 1rem;
  }
  .fenlei {
    width: 9rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
  }
  .fenlei p:nth-child(3) {
    color: red;
  }
  .xitop div:nth-child(3n + 2) {
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
  }
  .xitop img {
    width: 90%;
  }
  .mask {
    height: 1rem;
    background: #cccccc;
  }
  /*搜索框样式*/
  .inpt {
    background: #f2f2f2;
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .inpt input{
    width: 30rem;
    text-align: center;
    font-size: 1.2rem;
    height: 2rem;
    border-radius: 5px;
    border: 1px solid white;
    font-weight: 300;
  }
  input:-moz-placeholder,
  textarea:-moz-placeholder {
    color: #e83d41;
  }

  input:-ms-input-placeholder,
  textarea:-ms-input-placeholder {
    color: #e83d41;
  }

  input::-webkit-input-placeholder,
  textarea::-webkit-input-placeholder {
    color: #e83d41;
  }
  /*show*/
  .v_show_p {
    padding: 0.5rem 2.5rem 0.5rem 2.5rem;
    font-size: 1.2rem;
    background: red;
    border-radius: 5px;
    color: white;
    margin-top: 1rem;
    width: 8.5rem;
    margin: auto;
  }
  .aboutShow {
    background: rgba(0, 0, 0, 0.4);
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
  }
  .v_show{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: white;
    padding-top: 3rem;
    padding-bottom: 1rem;
  }
  .v_uls li {
    display: flex;
    justify-content: space-around;
  }
  .v_uls li div {
    width: 6rem;
    margin-bottom: 1rem;
  }
  .v_uls img {
    width: 3.2rem;
  }
  .slideDown-enter, .slideDown-leave-to{
    opacity: 0;
    transform: translateY(5rem);
  }
  .slideDown-enter-active, .slideDown-leave-active{
    transition: all 0.8s;
  }
</style>
